#include<stdio.h>
#include<stdio.h>
int main()
{
    int m,n,a,b,c,k;
    printf("Input m: ");
    scanf("%d",&m);
    printf("Input n: ");
    scanf("%d",&n);
    printf("\n");
    for(k=m; k<=n; k++)
    {
        a=k/100;
        b=(k-100*a)/10;
        c=k-100*a-10*b;
        if(a*a*a+b*b*b+c*c*c==k)
            printf(" %d \n",k);

    }


    return 0;
}
